<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="1" />
<meta name="acc" content="_assetRecord" />
<title>资产管理</title>
<link rel='stylesheet' type='text/css' href='${ctx}/scripts/fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='${ctx}/scripts/fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='${ctx}/scripts/fullcalendar/fullcalendar.js'></script>
<!--  通用情况下 不引入 js css  表单验证  js 放置到页面中 -->
<script>
		
		$(document).ready(function() {
			 $("input[name='startdate']").addClass("Wate").bind("focus", function(){
	    	 WdatePicker({skin:'whyGreen',minDate:'1900-10-01',maxDate:'#F{$dp.$D(\'enddate\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd HH:mm:ss'});});
			 $("input[name='enddate']").addClass("Wate").bind("focus", function(){
	    	 WdatePicker({skin:'whyGreen',minDate:'#F{$dp.$D(\'startdate\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'});});
		
			 $("#userid").click(function(){
				 var url ="${ctx}/account/json/userchooses.action";
					mm = showDialogWindow(url);
					if (mm != null) {
						$("#userid").val(mm);
					}
			});
			 
			 $("#inputForm").validate({
				 rules:{
					 userid:"required",
					 infoId:"required",
					 startdate:"required",
					 enddate:"required"
				 },
			 });
			 
		});
	</script>
</head>
<body>
<div id='calendar'></div>
<form action="${ctx}/asset/assets/record!save.action" method="post" id="inputForm" class="yform">
<div id="caption" ><h5>资产使用记录</h5></div>
<table class="noborder" border="0">
	<tr>
		<td>使用人</td>
		<td><input type="hidden" name="id" value="${id}" /> <input
			type="text" id="userid" name="userid" value="${userid}"/></td>
		<td>所用资产</td>
		<td><pt:labels type="assets" name="infoId" default="${assetInfo.id}"></pt:labels></td>
	</tr>
	<tr>
		<td>开始时间</td>
		<td><input type="text" id="startdate" name="startdate"
			value="${startdate}" readonly="readonly" /></td>
		<td>结束时间</td>
		<td><input type="text" id="enddate" name="enddate"
			value="${enddate}" readonly="readonly" /></td>
	</tr>
	<tr>
		<td>使用用途</td>
		<td colspan="3"><input type="text" name="describe" value="${describe}" />
		</td>
	</tr>
	<tr>
		<td>备注</td>
		<td colspan="3"><input type="text" name="remark"
			value="${remark}" /></td>
	</tr>
</table>
<div class="type-button"><input align="bottom" type="submit" class="submit" value="保存" />
<input align="bottom" type="button" class="reset" value="返回" onclick="history.back();" />
</div>
</form>
</body>
</html>
